World Atlas AREXX-Interface =========================== by Henrik Brinch Why AREXX? Because it is the FUTURE! Any program should have an AREXX host. It allows the end-user of a program to customize the program to individual user needs. What can I do with AREXX interface in World Atlas? It might sound strange to have an AREXX interface a program like World Atlas, but it gives the user a lot of advantages. You can create your own teacher which asks different questions about the data in WA (i.e. the Tutor.wa example) Are you tired of the editor? Then create an AREXX script for use with your own favorite editor. Have you ever thought about sharing information between World Atlas and other programs? In fact the possibilities are only limited by your imagination! AREXX is _NOT_ Public Domain, but a commercial piece of software, it is shipped with the 2.0 operating system, or available for 1.3 or 1.2 users by writing to William Hawes P.O. Box 308 Maynard, MA 01754 USA BEWARE! Some routines are designed for future expansions of World Atlas, and are not intended for general use, so I don't guarantee their usage! How to use World Atlas with AREXX. ---------------------------------- There are six different ways to use World Atlas with AREXX : 1. You have World Atlas running and you're in the SHELL. Here you can call AREXX programs by typing RX such as one of the examples supplied on the Program disk. 2. Another way is to invoke an AREXX program from ANOTHER program. That could be a text editor like CygnusEd or others with an AREXX port. The invoked AREXX program could be one of the supplied examples. 3. While you're using the World Atlas program you can press + . This will invoke ANY arexx program's you've written for World Atlas These programs _MUST_ have the names F1.wa, F2.wa, F3.wa etc. and be present in the REXX: directory. 4. Pressing (NO shift!) A requester appears and you can write the name of the AREXX script you want to run! To cancel the requester without executing a command, just click inside the requester. Note that the last typed command will always be in this requester, a fast way to delete is using + or + 5. Pressing (NO shift!) A requester appears and you can type in ANY AREXX command, i.e. (quotes must be included) 'africa' This will jump to the africa-map fast and easy! 6. You can run World Atlas with an argument from the CLI/Shell. For example: "wa rexx/tutor" This will invoke World Atlas AND the AREXX program tutor.wa (as a script). You can also invoke World Atlas like this: "wa 'infocard 0 40" that will start World Atlas with the infocard for Denmark (Denmark is number 40, refer to the AREXX commands below). Which of the methods you choose isn't important - do what suit your needs. You are not limited to entering the name of the AREXX script in the editor (refer to pt. 4). You can also enter a command directly, or multiple commands (separated by a ;). This is a great advantage. Suppose you are in the editor for the country "France" and you want to quickly get to the "Special Locations." How do you do this? Usually you would choose to get to the InfoCard, then to get to the "Select Menu", then you choose "Info On Earth", then you choose "Special Locations." Now, with AREXX, you can do this: While in the editor, press and in the requester type 'special_locations' (WITH the quotes or else WA will think it is an AREXX script with the name special_locations!). World Atlas will bring you right to the Special Locations! Why doesn't it work? -------------------- If World Atlas doesn't open an AREXX window, you aren't using AREXX. In other words, you haven't run the REXXMAST program. If World Atlas can't find the RexxMast task, it can't run AREXX. The normal way to do that is 'Rexxmast >NIL:' Remember you must also have some libraries. This manual isn't a tutor in how to install AREXX so please refer to your system or AREXX manual! Available AREXX commands : ========================== "africa" "area " "area_population" "asia" "australia" "capital " "change_area " "change_capital " "change_cities " "change_climate " "change_currency " "change_defense " "change_facts "change_government " "change_languages " "change_literacy " "change_neighbors " "change_population " "change_population_density " "change_religion " "change_unemployment " "checktype " "choose_from_maps" "cities " "climate " "clr_gadget" "clr_key" "clr_mouse" "con2num " "currency " "defense " "delay " "earth_facts" "editor " "edit_print" "edit_gr_print" "edit_reset" "edit_save" "edit_show" "europe" "execute " "facts " "gadget" "gadget_off " "gadget_on " "government " "info_menu" "infocard " "infocard_down" "infocard_eject" "infocard_ff" "infocard_play" "infocard_rew" "infocard_up" "key" "languages " "literacy " "main_menu" "main_states" "makeseed" "mouse" "mousewait" "mousex" "mousey" "mouse_off " "mouse_on " "neighbors " "north_america" "num2con " "org_asean" "org_commonwealth" "org_ec" "org_efta" "org_las" "org_nato" "org_oau" "org_oas" "org_oecd" "org_opec" "pointed_place" "popinccurve " "population " "population_density " "preferences" "quit" "release" "religion " "save_area" "save_capital" "save_cities" "save_climate" "save_currency" "save_defense" "save_facts" "save_government" "save_languages" "save_literacy" "save_neighbors" "save_population" "save_population_density" "save_religion" "save_unemployment" "seek_menu" "select_menu" "set_place " "show_on_map " "south_america" "special_locations" "suspend" "time_sectors" "unemployment " "usa2num " "version" "wa2back" "wa2front" "wb2back" "wb2front" "where_are_we" AREXX COMMAND DESCRIPTIONS ========================== Note: To make the commands easier to remember all commands which retrieve data from the program, must be given both VERSION and NUMBER. Logically you can't get any information about climates for the countries in the world - the return string will therefor look like this : "" If you tried to get data-type from a state which isn't allowed you will get : "". This is _ONLY_ supplied to prevent, situations where you can't remember which and what command wants what parameters! "africa" -------- Jumps to the map of Africa (Choose from Maps) "area " ------------------------- 0 = World Version 1 = USA Version Specified number of country/state Returns the area for a specified country/state "area_population" ----------------- Jumps to the Area And Population picture (equal to the function in the "Info On Earth"-menu) "asia" ------ Jumps to the map of Asia (Choose From Maps) "australia" ----------- Jumps to the map of Australia (Choose From Maps) "capital " ---------------------------- 0 = World Version 1 = USA Version Specified number of country/state Returns the capital for a specified country/state "change_area " "change_capital " "change_cities " "change_climate " "change_currency " "change_defense " "change_facts " "change_government " "change_languages " "change_literacy " "change_neighbors " "change_population " "change_population_density " "change_religion " "change_unemployment " ------------------------------------ A number specifying either population or area A normal text string as "Copenhagen" These functions changes the actual country to the specified type of data. These functions are ment to be used with the function "set_place ", but can also be used without if you're carefull. example : setplace 0 40 /* Set's the actual country to Denmark */ string = "A little town" change_capital string /* Changes the capital to the given data */ See also : "set_place" "checktype " -------------------- A normal text-string which you want to examine Checks the type of a country/state. This function can be used to dertermine if a string given name, is the name of a country or a state. ie. checktype california this will return 1 because California is an american state. Returns : 0 = If it is a country 1 = If it is an american state 255 = If it is neither of the above (UNKNOW COUNTRY/STATE) "choose_from_maps" ------------------ Jumps to the choose from maps, the section where you choose the actual part of the world (equal to the menu point of the same name) "cities " --------------------------- 0 = World Version 1 = USA Version Specified number of country/state Returns the cities for a specified country/state "climate " ---------------------------- 0 = World Version 1 = USA Version Specified number of country/state Returns the climate for a specified country/state "clr_gadget" ------------ Clears the last-gadget-clicked variable. See also : "gadget" "gadget_on" "gadget_off" "clr_key" --------- Clears the last-key-pressed variable. See also : "key" "clr_mouse" ----------- Clear the last-mousebutton-clicked variable See also : "mouse" "mouse_on" "mouse_off" "con2num " ------------------- a specified country Converts a country to a number. Returns the number of the country. "currency " ----------------------------- 0 = World Version 1 = USA Version Specified number of country/state Returns the currency for a specified country/state "defense " ---------------------------- 0 = World Version 1 = USA Version Specified number of country/state Returns the money used on defense for a specified country/state "delay " --------------- Specified value. 1 = 1/50 of a second. Makes a delay of a specified times of 1/50 of a second. "earth_facts" ------------- Jumps to the info on earth, equal to Info on earth / Facts "editor " --------------------------- 0 = World Version 1 = USA Version Specified number of country/state Invokes the editor for a specified country/state "edit_print" ------------ "Click's" the [PRINT] gadget in the editor - without graphic-dump. Note : No requester will appear to ask you if you're sure, it just does the job - beware of that! "edit_gr_print" --------------- "Click's" the [PRINT] gadget in the editor with graphic-dump. Note : No requester will appear to ask you if you're sure, it just does the job - beware of that! "edit_reset" ------------ "Click's" the [RESET] gadget in the editor. Note : No requester will appear to ask you if you're sure, it just does the job - beware of that! "edit_save" ----------- "Click's" the [SAVE] gadget in the editor. Note : No requester will appear to ask you if you're sure, it just does the job - beware of that! "edit_show" ----------- "Click's" the [SHOW] gadget in the editor. Note : No requester will appear to ask you if you're sure, it just does the job - beware of that! "europe" -------- Jumps to the map of Europe (Choose From Maps) "execute " ------------------ A string given by the user This function suspends World Atlas, and executes the is if it was typed in, in the CLI/Shell. Example : execute dir df0: This will freeze World Atlas, take a directory of df0: and return to World Atlas! "facts " -------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function returns the "scroll"-text-information for a specified country/state. "gadget" -------- This function returns the last click gadget. "gadget_off " --------------------- Number of a gadget This function turns a specified gadget off. Legal numbers of gadgets : [MENU] 1 [STATES] 2 [ARROW_UP] 3 [ARROW_DOWN] 4 [HOUR_UP] 5 [HOUR_DOWN] 6 [MINUTES_UP] 7 [MINUTES_DOWN] 8 [SELECT] 9 [MAP] 10 [CURVE] 11 [EDIT] 12 [REWIND] 13 [PLAY] 14 [FAST-FORWARD] 15 [EJECT] 16 [PRINT] 17 [RESET] 18 [SAVE] 19 [SHOW] 20 "gadget_on " -------------------- Number of a gadget This function turns a specified gadget on. See also : "gadget_off" "government " ------------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function returns the governmental system for a specified country/state. "info_menu" ----------- This function jumps to the "Info On Earth" menu "infocard " ----------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function invokes the infocard for a specified country/state "infocard_down" --------------- Scrolls the text-information on the infocard a line down "infocard_eject" ---------------- "Click's" the eject gadget on the infocard. "infocard_ff" ------------- "Click's" the fast-forward gadget on the infocard. "infocard_play" --------------- "Click's" the play gadget on the infocard. "infocard_rew" -------------- "Click's" the rewind gadget on the infocard. "infocard_up" ------------- Scrolls the text-information on the infocard a line up "key" ----- Returns the last pressed key, the return value is a RAWKEY code and NOT an ASCII value, please refer the ROM KERNAL manual or other technical documentation for a complete list of codes. "languages " ------------------------------ 0 = World Version 1 = USA Version Specified number of country/state This function returns the languages for a specified country/state. "literacy " ----------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function returns the literacy for a specified country/state. "main_menu" ----------- This function jumps to the main-menu for the current version "main_states" ------------- Jumps to the choose from maps (america version). "makeseed" ---------- This function returns a seed for use with AREXX' random function. "mouse" ------- Returns the last-clicked mousebutton. Values returned can be : 1 = Left mousebutton 2 = Right mousebutton "mousewait" ----------- This function does a simple Mousewait "mousex" -------- Returns the actual X position of the mousepointer "mousey" -------- Returns the actual Y position of the mousepointer "mouse_off " -------------------- specified value 1 or 2 (refer "mouse" for documentation) Turns specified mousebuttons off "mouse_on " ------------------- specified value 1 or 2 (refer "mouse" for documentation) Turns specified mousebuttons on "neighbors " ------------------------------ 0 = World Version 1 = USA Version Specified number of country/state This function returns the neighbors for a specified country/state. "north_america" --------------- Jumps to the map of North America (Choose from Maps) "num2con " ---------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function converts a number to a country, ie. num2con 0 40 would return Denmark (because it has # 40 in the countrylist). "org_asean" "org_commonwealth" "org_ec" "org_efta" "org_las" "org_nato" "org_oau" "org_oas" "org_oecd" "org_opec" ------------------ These functions will invoke the specified organization text/information. "pointed_place" --------------- This returns the last pointed country from a map. "popinccurve " ----------------------- This function invokes the population increase curve for a specified country. "population " ------------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function returns the population for a specified country/state. "population_density " --------------------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function returns the population density for a specified country/state. "preferences" ------------- Jumps to the PreferenceCard. "quit" ------ Ends World Atlas, with NO warning (BEWARE!). "release" --------- This function releases World Atlas, meaning the same as if you did mouse_on on both buttons, gadget_on on all gadgets. "religion " ----------------------------- 0 = World Version 1 = USA Version Specified number of country/state This function returns the religions for a specified country/state. "save_area" "save_capital" "save_cities" "save_climate" "save_currency" "save_defense" "save_facts" "save_government" "save_languages" "save_literacy" "save_neighbors" "save_population" "save_population_density" "save_religion" "save_unemployment" ------------------------- This will save the specified data-type on disk, BEWARE no "are you sure?" will be asked - so do be carefull, and remember always NOT to save anything on your original disks. "seek_menu" ----------- This function jumps to the seek-menu for the current version. "select_menu" ------------- This function jumps to the select-menu "set_place " ------------------------------ 0 = World Version 1 = USA Version Specified number of country/state "show_on_map " -------------------------------- 0 = World Version 1 = USA Version Specified number of country/state "south_america" --------------- Jumps to the map of South America (Choose from Maps) "special_locations" ------------------- Jumps to the Special Locations, equal to Info on earth / Special Locations "suspend" --------- This function suspends World Atlas, meaning the same as if you did mouse_off on both buttons, gadget_off on all gadgets. "time_sectors" -------------- Jumps to the Time Sectors, equal to Info on earth / Time Sectors "unemployment" -------------- This function returns the unemployment for a specified country/state. "usa2num " ----------------- A specified state Converts a state to a number. Returns the number of the state. "version" --------- Returns the current version number, and authors etc. "wa2back" --------- This pops the World Atlas screen to the back. "wa2front" ---------- This pops the World Atlas screen to the front. "wb2back" --------- This pops the WorkBench screen to the back (usefull to get the AREXX output window to the back). "wb2front" ---------- This pops the WorkBench screen to the front (usefull to get the AREXX output window to the front). "where_are_we" -------------- Returns a number, so your AREXX program can see where you are in WA. Play around with these numbers to find one suiting your needs! Actually not a function for you as a user, but implemented for future purposes! These variables are also used, for internal checking in World Atlas, for future reasons some numbers are missing in the list. Some numberes are also obsolete. Numbers which can be returned : PREFERENCE_CARD 1 SELECT_MENU 2 MAIN_MENU 3 INFO_ON_EARTH 4 SEEK_MENU 5 ORGANIZATIONS 6 INFOCARD 10 BIG_MAP 11 SMALL_MAP 12 EDITOR 13 END_WORLD_ATLAS 14 POPINCCURVE 15 FACTS 16 TIME_SECTORS 17 SPECIAL_LOCATIONS 18 POPULATION_AREA 19 AFRICA 20 EUROPE 21 ASIA 22 AUSTRALIA 23 NORTH_AMERICA 24 SOUTH_AMERICA 25 CHOOSE_FROM_MAPS 26 MAIN_STATES 27 SHOW_ON_MAP 28 NOPOPINC 29 SHOWING_ORGANIZATION 30 ASEAN 31 COMMONWEALTH 32 EC 33 EFTA 34 LAS 35 NATO 36 OAU 37 OAS 38 OECD 39 OPEC 40 FROM_LIST 41 FOUND_LIST 42